local function smartLibLoader(name)
	local libname = name
	local ok,f,err
		ok,f,err = pcall(package.loadlib,"./lib"..libname..'.so',"luaopen_"..name)
		if not ok then
			ok,f,err = pcall(package.loadlib,libname..'.so',"luaopen_"..name)
			if not ok then
				ok,f,err = pcall(package.loadlib,libname..'.dll',"luaopen_"..name)
			end
		end
	if ok and f then
		local ok,err=pcall(f)
		if not ok then print('error.loadlib ',libname,' error.',err);end
	else
		print('error.',err)
	end

end

smartLibLoader("redcell_wrapper")

